<template>
  <div class="main">
      <el-card class="search-box">
          <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
            <el-form-item label="申请人信息" prop="queryParam">
              <el-input
                v-model="queryParams.queryParam"
                placeholder="请输入申请人信息"
                clearable
                @keyup.enter.native="getList"
              />
            </el-form-item>
            <el-form-item>
              <el-button
                type="primary"
                icon="el-icon-search"
                size="mini"
                @click="getList"
                >查询</el-button
              >
              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
                >重置</el-button
              >
            </el-form-item>
          </el-form>
        </el-card>
        <el-card class="table-box">
          <el-table
            :data="tableData"
            v-loading="loading"
            :header-cell-style="{
              background: '#f5f7fa',
              color: '#000000',
            }"
            style="width: 100%"
          >
            <el-table-column prop="applyName" label="申请人"> </el-table-column>
            <el-table-column prop="applyPhone" label="联系电话"> </el-table-column>
            <el-table-column prop="applyCity" label="申请城市"> </el-table-column>
            <el-table-column prop="relateUser" label="关联用户账号"> </el-table-column>
            <el-table-column prop="applyTime" label="创建时间"> </el-table-column>
            <el-table-column prop="edit" label="操作" width="300"> 
              <template slot-scope="scope">
                <el-button  size="mini" type="primary" @click="audit(scope.row.id)">审核</el-button>
              </template>
            </el-table-column>
          </el-table>
          <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNumber" :limit.sync="queryParams.pageSize" @pagination="getList" />
        </el-card>
  </div>
</template>

<script>
import {queryAuditStoreList,} from '@/api/shop'
import Pagination from '@/components/Pagination'
export default {
name: '',
components: {Pagination},
props: {},
data() {
  return {
    dialogVisibleClose:false,
      queryParams:{
          pageNumber:1,
          pageSize:10,
          queryParam:'',
        
      },
      value:'',
      loading:true,
      total: 0,
      tableData:[],
      shopGradeList:[],
      storeId:null
  }
},
watch: {},
computed: {},
methods: {
      async getList(){
          const res = await queryAuditStoreList(this.queryParams);
          this.loading =false
          this.tableData = res.data.list
          this.total = res.data.total
      },
      resetQuery() {
          this.queryParams={
              pageNumber:1,
              pageSize:10,
              queryParam:''
          }
          this.getList()
      },
      audit(storeId){
        this.$router.push({path:'/shop/process-shop',query: {storeId}})
      },
    },
created() {
  this.getList()

},
mounted() {}
}
</script>

<style lang="less" scoped>

</style>